function func_item_within_restrict_list_retail_or_cost(restrictList, trait_store_map, retailStartDateForRestrict, retailEndDateForRestrict, itemNbr, traitNbr, storeId) {
    var restrict_list_retail_or_cost = false;
    if (!isNull(restrictList)) {
        restrictList.forEach(function (restrict) {
            if (restrict.itemNbr == itemNbr && restrict.status == '1') {
                if (!isNull(traitNbr) && traitNbr == 'ALL') {
                    var restrict_list_effective_date_intersection = func_item_within_restrict_list_effective_date_intersection(retailStartDateForRestrict, retailEndDateForRestrict, restrict.effectiveDate, restrict.expiryDate);
                    if (restrict_list_effective_date_intersection) {
                        restrict_list_retail_or_cost = true;
                    }
                } else if (!isNull(traitNbr)) {
                    if (isNull(restrict.storeNbr)) {
                        var restrict_list_effective_date_intersection = func_item_within_restrict_list_effective_date_intersection(retailStartDateForRestrict, retailEndDateForRestrict, restrict.effectiveDate, restrict.expiryDate);
                        if (restrict_list_effective_date_intersection) {
                            restrict_list_retail_or_cost = true;
                        }
                    } else {
                        var clubList = trait_store_map.get(traitNbr)
                        if (!isNull(clubList)) {
                            clubList.forEach(function (club) {
                                restrict.storeNbr.split(',').forEach(function (s) {
                                    if (s==club) {
                                        var restrict_list_effective_date_intersection = func_item_within_restrict_list_effective_date_intersection(retailStartDateForRestrict, retailEndDateForRestrict, restrict.effectiveDate, restrict.expiryDate);
                                        if (restrict_list_effective_date_intersection) {
                                            restrict_list_retail_or_cost = true;
                                        }
                                    }
                                })
                            })
                        }
                    }
                } else if (!isNull(storeId)) {
                    if (isNull(restrict.storeNbr)) {
                        var restrict_list_effective_date_intersection = func_item_within_restrict_list_effective_date_intersection(retailStartDateForRestrict, retailEndDateForRestrict, restrict.effectiveDate, restrict.expiryDate);
                        if (restrict_list_effective_date_intersection) {
                            restrict_list_retail_or_cost = true;
                        }
                    } else {
                        restrict.storeNbr.split(',').forEach(function (s) {
                            if (s == storeId) {
                                var restrict_list_effective_date_intersection = func_item_within_restrict_list_effective_date_intersection(retailStartDateForRestrict, retailEndDateForRestrict, restrict.effectiveDate, restrict.expiryDate);
                                if (restrict_list_effective_date_intersection) {
                                    restrict_list_retail_or_cost = true;
                                }
                            }
                        })
                    }
                }
            }
        })
    }
    return restrict_list_retail_or_cost;
}